package com.hbnu.test;

import com.hbnu.pojo.JUser;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;


public class MyRowMapper implements RowMapper<JUser> {


    @Override
    public JUser mapRow(ResultSet resultSet, int i) throws SQLException {
        int id=resultSet.getInt("id");
        String name=resultSet.getString("name");
        String password=resultSet.getString("password");
        String addr=resultSet.getString("addr");
        Double salary=resultSet.getDouble("salary");

        return new JUser(id,name,password,addr,salary);
    }
}
